﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace SmartPlant.Model.DbContext
{
    public class Enumeration
    {
        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "ID", IsPrimaryKey = true)]
        public decimal Id { get; set; }

        /// <summary>
        /// 父级列表<see cref="Id"/>
        ///</summary>
        [SugarColumn(ColumnName = "DEPENDSONID")]
        public decimal? Dependsonid { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "NAME")]
        public string Name { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "DESCRIPTION")]
        public string Description { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "DISPLAYUSAGE")]
        public decimal? Displayusage { get; set; }

        #region 1
        /// <summary>
        /// 拥有的下拉值集合
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<Codelist> codelists { get; set; }

        ///// <summary>
        ///// 索引器
        ///// </summary>
        ///// <param name="CODELIST_NUMBER">CODELIST_NUMBER</param>
        ///// <returns></returns>
        //[SugarColumn(IsIgnore = true)]
        //public List<Codelist> this[int CODELIST_NUMBER]
        //{
        //    get
        //    {
        //        return codelists.Where(x => x.CODELIST_NUMBER == CODELIST_NUMBER).ToList();
        //    }
        //}
        #endregion 1
    }
}
